package com.pikaqiu.warehouse.domain.dto;

import com.pikaqiu.warehouse.domain.entity.Products;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @Author: Administrator
 * @Date: 2024/8/14
 */
@Data
public class ProductDto {

    private Integer id;

    private String code;

    private String name;

    private String description;

    private Integer category;

    private String unit;

    private BigDecimal price;

    private Integer status;

    private BigDecimal stock;

    public ProductDto(Products products) {
        this.id = products.getId();
        this.code = products.getCode();
        this.name = products.getName();
        this.description = products.getDescription();
        this.category = products.getCategory();
        this.unit = products.getUnit();
        this.price = products.getPrice();
        this.status = products.getStatus();
        this.stock = products.getStock();
    }
}
